package com.aiit.mapper;

import com.aiit.pojo.Job;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: LuTao
 * @Date: 2022/05/09/9:29
 */
@Mapper
public interface JobMapper extends BaseMapper<Job> {

    //条件查询岗位搜索
    List<Job> getJobsByConditionInPage(@Param("skipCount") int skipCount,
                                       @Param("jobName") String jobName,
                                       @Param("education") String education,
                                       @Param("experience") String experience,
                                       @Param("startCreateTime") String startCreateTime,
                                       @Param("city") String city,
                                       @Param("business") String business);

//    List<Map<String, Object>> getNumOfJobInBusiness();
//
//    List<Map<String, Object>> getNumOfJobInArea();

    //根据条件分页查询岗位
    List<Job> getByCondition(@Param("skipCount") long skipCount,
                             @Param("limit") Long limit,
                             @Param("job") String job,
                             @Param("education") String education,
                             @Param("area") String area,
                             @Param("business") String business,
                             @Param("startDate") String startDate,
                             @Param("endDate") String endDate);
    //根据条件分页查询岗位数量
    Long getCountByCondition(@Param("job") String job,
                             @Param("education") String education,
                             @Param("area") String area,
                             @Param("business") String business,
                             @Param("startDate") String startDate,
                             @Param("endDate") String endDate);
}
